home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / library / help / tcl / control / commandloop < prev    next >
Encoding:
Text File  |  1993-10-26  |  1.5 KB  |  28 lines  |  [TEXT/$Tcl]

  1.  
  2.  
  3.           commandloop ?prompt1? ?prompt2?
  4.                Create an interactive command loop for the current  TCL
  5.                interpreter.  This command receives commands from stdin
  6.                and executes them.  It is useful TCL  scripts  that  do
  7.                not normally converse interactively with a user through
  8.                a Tcl command interpreter, but which sometimes want  to
  9.                enter this mode.
  10.  
  11.                Prompt1 is a Tcl command string that  is  evaluated  to
  12.                determine the text of the prompt string.  The old value
  13.                of tcl_prompt1 is saved and it is set to this value for
  14.                the duration of the command loop.  Prompt2 is a command
  15.                string that is evaluated to determine  the  ``downlevel
  16.                prompt'',  which is the prompt which is issued for con-
  17.                tinuation input.  The old value of tcl_prompt2 is saved
  18.                and  it  is  set  to this value for the duration of the
  19.                command loop.
  20.  
  21.                When the command  terminates,  the  variables  for  the
  22.                prompt  hooks will be set to their old value.  If these
  23.                arguments are not specified, the prompt hooks use their
  24.                current  value.   Prompt hooks are TCL code that return
  25.                as their result the prompt to output.   The  result  of
  26.                the  last command executed in the command string (which
  27.                may be a return) will be used as the prompt.
  28.